package org.mparts.client.ui;

import org.mparts.client.activity.Presenter;
import org.mparts.client.ui.editor.IPartitemEditorView;
import org.mparts.shared.proxy.AutoProxy;
import org.mparts.shared.proxy.PartgroupProxy;
import org.mparts.shared.proxy.PartitemProxy;

import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.ui.IsWidget;
import com.sencha.gxt.data.shared.ListStore;
import com.sencha.gxt.widget.core.client.event.SelectEvent.HasSelectHandlers;
import com.sencha.gxt.widget.core.client.grid.Grid;

public interface ICatalogView extends IsWidget {
	
	public void setPresenter(ICatalogPresenter presenter);
	
	public interface ICatalogPresenter extends Presenter {
		public void goTo(Place place);    	
//    	public void initEditorActivity(IPartitemEditorView view);
		public void loadLists( ListStore<PartgroupProxy> grpStore, ListStore<AutoProxy> autoStore, ListStore<String> engineStore );
	}
	
	public void setSearchCriteria( String criteria );
	public Grid<PartitemProxy> getGrid();
	public HasSelectHandlers getEdit();
	public HasSelectHandlers getAdd();
	public HasSelectHandlers getDelete();
	public void mask(boolean show);

}
